updating oE call_proc

call_proc

<built-in> procedure call_proc(integer id, sequence args={}) 

calls a user-defined Euphoria procedure by routine id.

Parameters:
  1. id : an integer, the routine id of the procedure to call
  2. args : a sequence, the parameters to pass to the function.
Errors:

If id is negative or otherwise unknown, an error occurs.

If the length of args is not the number of parameters the function takes, an error occurs.

Comments:

id must be a valid routine id returned by routine_id.

args must be a sequence of argument values of length n, where n is the number of arguments required by the called procedure. Defaulted parameters currently cannot be synthesized while making a indirect call.

If the procedure with id id does not take any arguments then args should be {}.

Example 1:
public integer foo_id 
 
procedure x() 
    call_proc(foo_id, {1, "Hello World\n"}) 
end procedure 
 
procedure foo(integer a, sequence s) 
    puts(a, s) 
end procedure 
 
foo_id = routine_id("foo") 
 
x() 
See Also:

call_func, routine_id, c_proc

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu